package com.hhkj.admin.question.controller;

import com.hhkj.admin.question.domain.ProblemFeedback;
import com.hhkj.admin.question.model.req.ProblemFeedbackReq;
import com.hhkj.admin.question.model.res.ProblemFeedbackRes;
import com.hhkj.admin.question.service.biz.ProblemFeedbackBizService;
import com.ruoyi.common.annotation.LogTitlePrefix;
import com.ruoyi.common.annotation.PermissionPrefix;
import com.ruoyi.common.base.biz.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.valid.VEdit;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ProblemFeedbackController
 *
 * @author SERVER
 * @since 2024/3/28 9:47
 */
@LogTitlePrefix("反馈信息")
@PermissionPrefix("problem:feedback")
@RestController
@Controller
@RequestMapping("/problem")
public class ProblemFeedbackController
        extends BaseController<ProblemFeedback, ProblemFeedbackReq, ProblemFeedbackRes, ProblemFeedbackBizService> {


    /**
     * 处理问题反馈
     * @param req
     * @return
     */
    @PutMapping("/handler")
    public AjaxResult handler(@Validated(VEdit.class) @RequestBody ProblemFeedbackReq req) {
        return AjaxResult.success(getBizService().handlerProblemFeedback(req));
    }
}